Nominal and Structural Subtyping in Component-Based Programming
نویسنده
چکیده
In nominal type systems, the subtype relation is between names of types, and subtype links are explicitly declared. In structural type systems, names are irrelevant; in determining type compatibility, only the structure of types is considered, and a type name is just an abbreviation for the full type. We analyze structural and different flavors of nominal subtyping from the perspective of component-based programming, where issues such as blame assignment and modular extensibility are important. Our analysis puts various existing subtyping mechanisms into a common frame of reference and delineates the frontiers of the subtyping design space. In addition, we propose a new subtyping definition in one particularly interesting corner of the design space which combines the safety of nominal subtyping with the flexibility of structural subtyping.
منابع مشابه
Thesis Proposal
Nominal subtyping and structural subtyping each have their own strengths and weaknesses. Nominal subtyping allows programmers to explicitly express design intent, and, when types are associated with run-time tags, enables efficient run-time type tests (e.g., downcasts) and external/multimethod dispatch. On the other hand, structural subtyping is flexible and compositional, allowing unanticipate...
متن کاملAn Overview of Nominal-Typing versus Structural-Typing in Object-Oriented Programming
NOOP [4, 6, 7, 8] is a mathematical model of nominally-typed OOP that proves the identification of inheritance and subtyping in mainstream nominally-typed OO programming languages and the validity of this identification [11]. This report gives an overview of the main notions in OOP relevant to constructing a mathematical model of OOP such as NOOP. The emphasis in this report is on defining nomi...
متن کاملIntegrating Nominal and Structural Subtyping
Nominal and structural subtyping each have their own strengths and weaknesses. Nominal subtyping allows programmers to explicitly express design intent, and, when types are associated with run time tags, enables run-time type tests and external method dispatch. On the other hand, structural subtyping is flexible and compositional, allowing unanticipated reuse. To date, nearly all object-oriente...
متن کاملSemantic Subtyping for Objects and Classes
In this paper, we propose an integration of structural subtyping with boolean connectives and semantic subtyping to define a Java-like programming language that exploits the benefits of both techniques. Semantic subtyping is an approach for defining subtyping relation based on set-theoretic models, rather than syntactic rules. On the one hand, this approach involves some non-trivial mathematica...
متن کاملIs Structural Subtyping Useful? An Empirical Study
Structural subtyping is popular in research languages, but all mainstream object-oriented languages use nominal subtyping. Since languages with structural subtyping are not in widespread use, the empirical questions of whether and how structural subtyping is useful have thus far remained unanswered. This study aims to provide answers to these questions. We identified several criteria that are i...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Journal of Object Technology
دوره 7 شماره
صفحات -
تاریخ انتشار 2008